<template>
    <div id="renzheng">
        <BackHeader :header="Header"></BackHeader>
        <div class="userhead mt40">
            <img src="../../assets/img/8.jpg">
        </div>
        <div class="ooos">
          <mt-field label="学号：" placeholder="154*******" v-model="stuNum"></mt-field>
          <mt-field label="密码：" placeholder="教务系统密码" v-model="stuPsw" type="password"></mt-field>
            <!-- <mt-field label="就读学校：" placeholder="广州大学华软软件学院" v-model="xuexiao"></mt-field>
            <mt-field label="真实姓名：" placeholder="请输入姓名" v-model="username"></mt-field>
            <mt-field label="学号：" placeholder="请输入学号" v-model="password"></mt-field>
            <mt-field label="身份证号：" placeholder="请输入身份证号码" v-model="shenfen"></mt-field>
            <mt-field label="入学年份：" placeholder="2015" v-model="ruxue"></mt-field> -->
        </div>
        <div class="tijiao">
            <mt-button type="primary" size='large' @click="submit">提交认证</mt-button>
        </div>
        <div class="ziti">
            <p>
                1. 用户所上传的材料仅用于个人认证，其他用户不可查看。?<br> 
                2. 学校名称，姓名、性别必须与学生证与身份证信息一致。?<br> 
                3. 一旦认证通过，图标亮点后，以上信息再次修改，将取消认证状态，需用户自行提交认证申请重新进入审核流程。?<br>             
                4. 认证申请将在信息提交后一定时间工作日内审核完成。?<br>
                5. 正在审核过程的用户无法重复提交材料审核，请认真对待申请。<br>
            </p>
        </div>
        
    </div>
</template>
<script>
import { Button } from "mint-ui";
import { MessageBox } from "mint-ui";
import BackHeader from "../../components/Header/BackHeader.vue";
import MemberCenterProvider from "@/providers/MemberCenterProvider";
export default {
  name: "renzheng",
  data() {
    return {
      Header: "学生认证",
      stuNum: "",
      stuPsw: ""
    };
  },
  components: {
    BackHeader
  },
  methods: {
    submit() {
      let data = {
        student : {
          userName: this.stuNum,
          password: this.stuPsw
        }
      }
      MemberCenterProvider.checkStu(data).then( res => {
        if(res.data == "学生认证失败"){
          MessageBox.alert("认证失败!请重新填写!", "提示");
        } else {
          MessageBox.alert('学生认证成功!', "提示").then(action => {
            this.$router.push("/stuMsg");
          });
        }
      })
    }
  }
};
</script>
<style lang="scss" scoped>
.bg {
  margin-top: 100px;
}

.tijiao {
  margin-left: 45px;
  margin-right: 45px;
  margin-top: 20px;
}

.userhead > img {
  width: 375px;
  height: 180px;
}
.ziti {
  margin-top: 100px;
}
.ziti > p {
  margin-left: 15px;
  font-size: 10px;
  color: green;
}

.ooos {
  display: flex;
  margin-top: 30px;
  align-items: center;
  flex-direction: column;
}
</style>